import { Map } from "immutable";

import { CHANGE_TOP_BANNERS } from "./constants";

const initialState = Map({
  topBanners: [],
});

function reducer(state = initialState, { type, payload }) {
  switch (type) {
    case CHANGE_TOP_BANNERS:
      return state.set("topBanners", payload);
    default:
      return state;
  }
}

export default reducer;
